﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DienDanTinTheoChuDe.aspx.cs" Inherits="WebHousingInfo.DienDanTinTheoChuDe" %>

<%@ Register Src="~/Controls/Header.ascx" TagName="HD" TagPrefix="Header" %>
<%@ Register Src="~/Controls/MenuFooter.ascx" TagName="MN" TagPrefix="MenuFooter" %>
<%@ Register Src="~/Controls/Footer.ascx" TagName="FT" TagPrefix="Footer" %>
<%@ Register Src="~/Controls/NoiThat.ascx" TagName="NT" TagPrefix="NoiThat" %>
<%@ Register Src="~/Controls/DanhMucNhaChoThue.ascx" TagName="CT" TagPrefix="DanhMucNhaChoThue" %>
<%@ Register Src="~/Controls/TimKiem_DienDan.ascx" TagName="TK" TagPrefix="TimKiem" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">

    <title>Danh sách tin diễn đàn theo chủ đề</title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="uni_wrapper">
        <% string mode = Request.QueryString["idsub"];
            int idsubforum = Convert.ToInt32(mode);
            var objectSubForum = HousingInfo.Library.SubTopicForumBO.GetSubTopicForumBO(idsubforum);
            var objectCategory = HousingInfo.Library.CategoryBO.GetCategoryBO(Convert.ToInt32(objectSubForum.CategoryID));  
        %>
        <Header:HD ID="Header" runat="server" />
        <div id="uni_main">
             <div id="content" class="clearfix">
                 
                 <div id="group_750_l">

                    
                 <div class="box02_title">
					<table cellspacing="5" cellpadding="1" border="0">
						<tbody>
						    <tr valign="bottom">
							    <td><a href="DienDanNhaDat.aspx">
								    <img border="0" title="Go Back" src="Admin/img/navbits_start.gif" alt="Go Back"></a>
							    </td>
							    <td>&nbsp;</td>
							    <td width="100%">
								    <span class="navbar"><a href="DienDanNhaDat.aspx" accesskey="1">Diễn đàn nhà đất</a></span>   
								    <span class="navbar">&gt; 
								    <a href="DienDanNhaDat.aspx"><%=objectCategory.CategoryName%></a></span> 
							    </td>
						    </tr>
						    <tr>
							    <td class="navbar" style="font-size: 10pt; padding-top: 1px;" colspan="3">
								    <img border="0" title="Xem Thống Kê Mới" class="inlineimg" src="Admin/img/navbits_finallink_ltr.gif" alt="Xem Thống Kê Mới">
								    <strong> <%=objectSubForum.SubTopicForumName %>  </strong>
							    </td>
						    </tr>
					    </tbody>
					</table>
				</div>
				<div>
				    <table class="binhluan" style="width:100%">
					    <tbody>
					        <tr>
						        <td style="width:150px;">
							        <a href="BaiVietDienDan.aspx?idsub=<%=objectSubForum.SubTopicForumID %>">
								        <img height="42" border="0" align="left" width="150" src="Admin/img/new_thread.gif">
							        </a>
						        </td>
						        <td>
						            <TimKiem:TK ID="TimKiem" runat="server" />
						        </td>   
					       </tr>
				       </tbody>
				    </table>
			    </div>
				
			        <div id="ketquatimkiem" class="clearfix">
			        <table cellspacing="1" cellpadding="4" border="0" class="tborder">
                            <tbody>
						        <tr>
							        <td colspan="5" class="theadtitledd">						
								        <font size="3"><b style="color: white;"> <%=objectSubForum.SubTopicForumName %></b></font>			
							        </td>
						        </tr>
					        </tbody>	                           
					        <tbody>
						        <tr align="center">
						          <td class="tcat">&nbsp;</td>
						          <td width="484" class="tcat">Diễn đàn</td>
						          <td width="200" class="tcat">Người gửi</td>
						          <td width="55" class="tcat">Trả lời</td>
						          <td width="60" class="tcat">Lần đọc</td>
						        </tr>
					        </tbody>   
					       <% var objectforumNews=HousingInfo.Library.ForumNewsBOList.GetAllForumNews_ByIDSubTopic(idsubforum);
                                int total = 0;   	           
					           foreach (var obforumnews in objectforumNews)
                               {%>
                               <tbody>				                  
						        <tr align="center">
							        <td class="trcategory">
								        <img border="0" width="25px" height="25px" id="forum_statusicon_2" alt="" src="Image/cottage.ico">
							        </td>
							        <td align="left" id="f2" class="trcategory">
								        <div><a href="DienDanBinhLuan.aspx?categoryid=<%=obforumnews.SubTopicForumID %>&id=<%=obforumnews.ForumNewID %>"><strong><%=obforumnews.Title %></strong></a></div>
							        </td>						        
							        <td class="trcategory">
								        <div align="left">
									        <div>
										        bởi <a href="ThanhVienDienDan.aspx?iduser=<%= obforumnews.UserName %>"><%=obforumnews.UserName %></a>
									        </div>
									        <div align="right">
										        ngày <span class="time"><%=Convert.ToDateTime(obforumnews.CreatedDate).ToString("dd/MM/yyyy") %></span>
									        </div>
								        </div>
							        </td>
							        <% total += HousingInfo.Library.ForumCommentBOList.CountTotalForumNews_BySubID(obforumnews.ForumNewID); %>
							        <td class="trcategory"><%=total%></td>
							        <td class="trcategory"><%=obforumnews.ViewCount%></td>
						        </tr>						        					       
                                </tbody>
                                
                               <%}%>			        
				        </table>
			        </div>
			        <div id="link">
				        <ul>
					        <li class="disable_link"><a>« Trở về</a></li>
					        <li class="select"><a>1</a></li>
					        <li><a href="#"><strong>2</strong></a></li>
				        </ul>
			        </div>
		        </div>
		            <div id="group_5">
			            <DanhMucNhaChoThue:CT ID="DanhMucNhaChoThue" runat="server" />
			            <NoiThat:NT ID="NoiThat" runat="server" />
		            </div>
            </div>
        </div>
         <MenuFooter:MN ID="MenuFooter" runat="server" />
         <Footer:FT ID="Footer" runat="server" />
    </div>
    </form>
</body>
</html>

